package org.jackysoft.struts2.admin;

import java.util.Collection;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.jackysoft.entity.nosql.OperationLog;
import org.jackysoft.service.OperationLogService;
import org.jackysoft.struts2.UtilsCRUDAction;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller
@Namespace("/operationlog")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class OperationLogAction extends UtilsCRUDAction<OperationLog> {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7702949853368658009L;
	private OperationLogService service;
	private OperationLog bean;
	private Collection<OperationLog> beans;
 
	public String view() throws Exception{
		service.get(bean.getId());
		return "view";
	}

	
	public void setBean(OperationLog bean) {
		this.bean = bean;
	}

	public OperationLog getBean() {
		return this.bean;
	}

	public void setBeans(Collection<OperationLog> beans) {

		this.beans = beans;
	}

	public Collection<OperationLog> getBeans() {
		return this.beans;
	}

	@Resource
	public void setService(OperationLogService service) {
		this.service = service;	
		this.setDataProvider(service);
	}

}